#include<stdio.h>
 
 
 int count_bit_one(unsigned int n)
 {
 	   
		int count = 0; 
 	
 	while (n)
 	{
 		
 		if(n % 2 == 1)
 		{
 			count++;
 			n = n/2; 
 			 
		 }
 		
	 }
 	return count;
 	
 	
  } 
 
 
 int main()
 {
 	int num = 0;
 	scanf("%d",&num);
    int ret = count_bit_one(num);
 	  printf("%d",ret);
 	  return 0;
  } 
